<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui">

<ui:composition template="/pages/templates/template.xhtml">
	<ui:define name="title">
		<h:outputText value="#{msgPro.lblproyecto}" />
	</ui:define>
	<ui:define name="content">
		<f:loadBundle basename="i18n.messages" var="msg" />
		<f:loadBundle basename="i18n.msg-project" var="msgPro" />
		<h:form id="formProject">
			<p:growl id="growl" showDetail="true" sticky="true" />  
			<p:panel header="#{msgPro.lblproyecto}" id="pnlProject">
					<h:panelGrid columns="4">
						<p:outputLabel value="#{msgPro.lblNombre}" />
						<p:inputText maxlength="100" value="#{projectUI.proyecto.nombre}" />
						<p:outputLabel value="#{msgPro.lblOrganizacion}" />
						<p:inputText maxlength="50" value="#{projectUI.proyecto.organizacion}" />

						<p:outputLabel value="#{msgPro.lblPais}" />
						<p:inputText maxlength="20" value="#{projectUI.proyecto.pais}" />
						<p:outputLabel value="#{msgPro.lblEstado}" />
						<p:selectOneMenu id="project_estado" 
							value="#{projectUI.estado}">
							<f:selectItems value="#{projectUI.listEstado}" />
						</p:selectOneMenu>
					</h:panelGrid>
					<h:panelGrid width="100%">
						<p:outputLabel value="#{msgPro.lblObservacion}" />
						<p:inputTextarea value="#{projectUI.proyecto.observacion}"
							cols="100" maxlength="200" rows="3" />
					</h:panelGrid>
			</p:panel>
			<p:fieldset>
				<div align="center">
				<p:commandButton value="#{msgPro.btnGuardar}" action="#{projectUI.actionGuardar}" 
					process="@form" update="@form"/>
				<p:commandButton value="#{msgPro.btnLimpiar}" action="#{projectUI.actionLimpiar}" 
					process="pnlProject" update="pnlProject"/>
				<p:commandButton value="#{msgPro.btnRegresar}" action="#{projectUI.actionRegresar}"/>
				</div>
			</p:fieldset>
		</h:form>
	</ui:define>
</ui:composition>
</html>